<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;

Route::post('send/sms', [\App\Api\Controllers\BaseController::class, 'send_sms']);
Route::post('options', [\App\Api\Controllers\BaseController::class, 'options']);
Route::post('article', [\App\Api\Controllers\BaseController::class, 'article']);
Route::post('service', [\App\Api\Controllers\BaseController::class, 'service']);
Route::post('shili', [\App\Api\Controllers\BaseController::class, 'index_li']);

Route::post('login', [\App\Api\Controllers\LoginController::class, 'login']);
Route::post('login/test', [\App\Api\Controllers\LoginController::class, 'login_test']);
Route::post('login/search', [\App\Api\Controllers\LoginController::class, 'test']);

Route::post('sys/banner', [\App\Api\Controllers\SysController::class, 'banner']);
Route::post('sys/notice', [\App\Api\Controllers\SysController::class, 'notice']);
Route::post('sys/ad', [\App\Api\Controllers\SysController::class, 'ad']);
Route::post('sys/get_data_count', [\App\Api\Controllers\SysController::class, 'get_data_count']);
Route::post('sys/integrate_set', [\App\Api\Controllers\SysController::class, 'integrate_set']);
Route::post('index/data', [\App\Api\Controllers\BaseController::class, 'index_data']);
Route::post('upload', [\App\Api\Controllers\BaseController::class, 'Upload']);
Route::post('search/test', [\App\Api\Controllers\SearchController::class, 'search_test']);
Route::post('search/detail_log', [\App\Api\Controllers\SearchController::class, 'log_detail']);

Route::group([
    'middleware' => ['user.token'],
], function (Router $router) {
    $router->post('user/detail', [\App\Api\Controllers\UserController::class, 'detail']);
    $router->post('user/set_red_dot', [\App\Api\Controllers\UserController::class, 'set_red_dot']);
    $router->post('user/update_detail', [\App\Api\Controllers\UserController::class, 'update_detail']);
    $router->post('user/visiting_card', [\App\Api\Controllers\UserController::class, 'visiting_card']);
    $router->post('user/integrate', [\App\Api\Controllers\UserController::class, 'integrate']);
    $router->post('user/search', [\App\Api\Controllers\UserController::class, 'search_id']);
    $router->post('user/test', [\App\Api\Controllers\UserController::class, 'test']);
    $router->post('user/log/fund', [\App\Api\Controllers\UserLogController::class, 'fund_log']);
    $router->post('user/log/sysmessage', [\App\Api\Controllers\UserLogController::class, 'sys_message_log']);
    $router->post('user/log/sysmessage/detail', [\App\Api\Controllers\UserLogController::class, 'sys_message_detail']);

    $router->post('user/log/browse', [\App\Api\Controllers\UserLogController::class, 'browse_log']);
    $router->post('user/log/collect', [\App\Api\Controllers\UserLogController::class, 'collect_log']);

    $router->post('search', [\App\Api\Controllers\SearchController::class, 'search']);
    $router->post('search/detail', [\App\Api\Controllers\SearchController::class, 'search_detail']);

    $router->post('search/collect', [\App\Api\Controllers\SearchController::class, 'collect']);
    $router->post('search/contact', [\App\Api\Controllers\SearchController::class, 'pay_contact']);

    $router->post('user/recharge', [\App\Api\Controllers\PayController::class, 'app_pay']);
    $router->post('user/show_contact', [\App\Api\Controllers\PayController::class, 'pay_contact']);
});

Route::post('pay/notify', [\App\Api\Controllers\PayController::class, 'notify']);


